<?php

if (defined('NO_DIRECT')) {
	$post = get_posts($session['user']['user_id']);
	$following = get_posts($session['user']['user_id']);
	$follower = get_posts($session['user']['user_id']);
	$topics = db_array('SELECT topic_tag, count(*) AS jml FROM topics INNER JOIN status ON stat_id = topic_stat WHERE stat_date >= "'.date('Y-m-d H:i:s',strtotime('-3 days')).'" AND stat_date <= "'.date('Y-m-d H:i:s').'" GROUP BY topic_tag ORDER BY jml DESC LIMIT 0,10');
	echo '<p><strong>Terkenal:</strong><br />';
	foreach ($topics as $topic) {
		echo '<a href="#search-'.$topic['topic_tag'].'">#'.$topic['topic_tag'].'</a><br />';
	}
	echo '<p>';
}
